YNQ  YNQ-1.5.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Network Browsing

Data Structures

struct  CCNetShareItemA
 
struct  CCNetShareItem
 
struct  CCNetServerItem
 
struct  CCNetDomainItem
 

Functions

NQ_BOOL ccNetworkSetDefaultDomainA (const NQ_CHAR *domain)
 
NQ_BOOL ccNetworkSetDefaultDomain (const NQ_WCHAR *domain)
 
void ccNetworkCacheSet (NQ_UINT32 timeout)
 
const NQ_CHARccNetworkGetDefaultDomainA ()
 
const NQ_WCHARccNetworkGetDefaultDomain ()
 
NQ_HANDLE ccNetworkEnumerateDomains (void)
 
CCNetDomainItemccNetworkGetNextDomainItem (NQ_HANDLE handle)
 
NQ_HANDLE ccNetworkEnumerateServersA (const NQ_CHAR *domain)
 
NQ_HANDLE ccNetworkEnumerateServers (const NQ_WCHAR *domain)
 
CCNetServerItemccNetworkGetNextServerItem (NQ_HANDLE handle)
 
NQ_HANDLE ccNetworkEnumerateSharesA (const NQ_CHAR *server)
 
NQ_HANDLE ccNetworkEnumerateShares (const NQ_WCHAR *server)
 
const NQ_CHARccNetworkGetNextItemNameA (NQ_HANDLE handle)
 
const NQ_WCHARccNetworkGetNextItemName (NQ_HANDLE handle)
 
CCNetShareItemccNetworkGetNextShareItem (NQ_HANDLE handle)
 
NQ_BOOL ccNetworkGetShareInfoA (const NQ_CHAR *server, const NQ_CHAR *share, NQ_UINT16 *type, NQ_CHAR *remarkBuffer, NQ_INT bufferSize)
 
NQ_BOOL ccNetworkGetShareInfo (const NQ_WCHAR *server, const NQ_WCHAR *share, NQ_UINT16 *type, NQ_WCHAR *remarkBuffer, NQ_INT bufferSize)
 
NQ_BOOL ccNetworkCloseHandle (NQ_HANDLE handle)
 
NQ_BOOL ccNetworkResetHandle (NQ_HANDLE handle)
 

Detailed Description

Function Documentation

NQ_BOOL ccNetworkSetDefaultDomainA ( const NQ_CHAR domain)

This function defines the name of domain/workgroup that will be used as the default in subsequent calls to ccNetwork methods.

Parameters
domainThe name of the default domain/workgroup to be used in subsequent calls.
Returns
This function returns TRUE if domain is valid parameter or FALSE otherwise.
Note
NQ_BOOL ccNetworkSetDefaultDomain ( const NQ_WCHAR domain)

This function defines the name of domain/workgroup that will be used as the default in subsequent calls to ccNetwork methods.

Parameters
domainThe name of the default domain/workgroup to be used in subsequent calls.
Returns
This function returns TRUE if domain is valid parameter or FALSE otherwise.
Note
This function is only available when NQ supports the NetBIOS transport.
void ccNetworkCacheSet ( NQ_UINT32  timeout)

This function sets network browsing cache state.

Network browsing cache is enabled by default.

Parameters
timeoutTimeout/ttl value for entry cache (0 to disable cache)
Note
When cache is enabled domains, servers and shares per server are cached. This function is part of the new browser API.
const NQ_CHAR* ccNetworkGetDefaultDomainA ( )

This function is called by application to get the name of the workgroup/domain that CIFS Client will use by default. This default will be used in those CIFS Client functions where workgroup/domain is not explicitly specified.

Returns
Buffer pointer to the name of the default domain/workgroup.
Note
  • This function is relevant when NQ supports the NetBIOS transport.
  • This function is part of the new Browser API. The functions of the new Browser API are designated with a ccNetwork... prefix.
  • This an ASCII version of ccNetworkGetDefaultDomain()
const NQ_WCHAR* ccNetworkGetDefaultDomain ( )

This function is called by application to get the name of the workgroup/domain that CIFS Client will use by default. This default will be used in those CIFS Client functions where workgroup/domain is not explicitly specified.

Returns
Buffer pointer to the name of the default domain/workgroup.
Note
  • This function is relevant when NQ supports the NetBIOS transport.
  • This function is part of the new Browser API. The functions of the new Browser API are designated with a ccNetwork... prefix.
NQ_HANDLE ccNetworkEnumerateDomains ( void  )

This function is called by application to start enumerating domains/workgroups. It executes necessary transactions to withdraw domains/workgroups announced on the network. After successful return from this call, NQ Client creates a list of domains/workgroups designated by an abstract handle.

Application may withdraw domain/workgroup names one by one by calling ccNetworkGetNextDomainItem() with the handle obtained in the current call. When finished with domain enumeration, application must call ccNetworkCloseHandle() to release resources associated with this handle.

Returns
This function returns an enumeration handle. Application should use this abstract handle in subsequent calls to ccNetworkGetNextDomainItem(). On error this function returns a NULL handle. Application can examine the error code for the failure reason.
Note
  • The resulted handle is not thread safe.
  • This function is only available when NQ supports the NetBIOS transport.
CCNetDomainItem* ccNetworkGetNextDomainItem ( NQ_HANDLE  handle)

Application calls this function after successfully starting a domain enumeration (ccNetworkEnumerateDomains()).

Application may withdraw CCNetDomainItem Items one by one by calling ccNetworkGetNextDomainItem() with the handle obtained in the current call. When finished with domain enumeration, application must call ccNetworkCloseHandle() to release resources associated with this handle.

Parameters
handleEnumeration handle as obtained in one of Browser enumeration calls.
Returns
This function returns a pointer to the next CCNetDomainItem structure in the enumeration. This function returns a NULL pointer when NQ Client reaches the end of enumeration.
NQ_HANDLE ccNetworkEnumerateServersA ( const NQ_CHAR domain)

This function is called by application to start enumerating servers of a particular domain/workgroups. It executes necessary transactions to withdraw the server list. After successful return from this call, NQ Client creates a list of servers designated by an abstract handle.

Application may withdraw server names one by one by calling ccNetworkGetNextItemName() with the handle obtained in the current call. When finished with domain enumeration, application must call ccNetworkCloseHandle() to release resources associated with this handle.

Parameters
domainDomain/workgroup name. This call will return a list of servers for this domain/workgroup. When domain name not supplied the default one will be used see ccNetworkSetDefaultDomain(), in addition all hosts discoverable over WS-Discovery will be returned.
Returns
This function returns an enumeration handle. Application should use this abstract handle in subsequent calls to ccNetworkGetNextItemName(). On error this function returns a NULL handle. Application can examine the error code for the failure reason.
Note
NQ_HANDLE ccNetworkEnumerateServers ( const NQ_WCHAR domain)

This function is called by application to start enumerating servers of a particular domain/workgroups. It executes necessary transactions to withdraw the server list. After successful return from this call, NQ Client creates a list of servers designated by an abstract handle.

Application may withdraw server names one by one by calling ccNetworkGetNextItemName() with the handle obtained in the current call. When finished with domain enumeration, application must call ccNetworkCloseHandle() to release resources associated with this handle.

Parameters
domainDomain/workgroup name. This call will return a list of servers for this domain/workgroup. When domain name not supplied the default one will be used see ccNetworkSetDefaultDomain(), in addition all hosts discoverable over WS-Discovery will be returned.
Returns
This function returns an enumeration handle. Application should use this abstract handle in subsequent calls to ccNetworkGetNextItemName(). On error this function returns a NULL handle. Application can examine the error code for the failure reason.
Note
The resulted handle is not thread-safe.
CCNetServerItem* ccNetworkGetNextServerItem ( NQ_HANDLE  handle)

Application calls this function after successfully starting a server enumeration (ccNetworkEnumerateServers()).

Application may withdraw CCNetServerItem Items one by one by calling ccNetworkGetNextServerItem() with the handle obtained in the current call. When finished with server enumeration, application must call ccNetworkCloseHandle() to release resources associated with this handle.

Parameters
handleEnumeration handle as obtained in one of Browser enumeration calls.
Returns
This function returns a pointer to the next CCNetServerItem structure in the enumeration. This function returns a NULL pointer when NQ Client reaches the end of enumeration.
NQ_HANDLE ccNetworkEnumerateSharesA ( const NQ_CHAR server)

This function is called by application to start enumerating shares on a particular server. It executes necessary transactions to withdraw the list of shares. After successful return from this call, NQ Client creates a list of shares designated by an abstract handle.

Application may withdraw share names one by one by calling ccNetworkGetNextItemName() with the handle obtained in the current call. When finished with domain enumeration, application must call ccNetworkCloseHandle() to release resources associated with this handle.

Parameters
serverServer name. This call will return a list of shares for this server.
Returns
This function returns an enumeration handle. Application should use this abstract handle in subsequent calls to ccNetworkGetNextItemName(). On error this function returns a NULL handle. Application can examine the error code for the failure reason.
Note
NQ_HANDLE ccNetworkEnumerateShares ( const NQ_WCHAR server)

This function is called by application to start enumerating shares on a particular server. It executes necessary transactions to withdraw the list of shares. After successful return from this call, NQ Client creates a list of shares designated by an abstract handle.

Application may withdraw share names one by one by calling ccNetworkGetNextItemName() with the handle obtained in the current call. When finished with domain enumeration, application must call ccNetworkCloseHandle() to release resources associated with this handle.

Parameters
serverServer name. This call will return a list of shares for this server.
Returns
This function returns an enumeration handle. Application should use this abstract handle in subsequent calls to ccNetworkGetNextItemName(). On error this function returns a NULL handle. Application can examine the error code for the failure reason.
Note
The resulted handle is not thread-safe.
const NQ_CHAR* ccNetworkGetNextItemNameA ( NQ_HANDLE  handle)

Application calls this function after successfully starting a browser enumeration ( ccNetworkEnumerateDomains(),ccNetworkEnumerateServers() or ccNetworkEnumerateShares()). Application may withdraw share names one by one by calling ccNetworkGetNextItemName() with the handle obtained in the current call. When finished with domain enumeration, application must call ccNetworkCloseHandle() to release resources associated with this handle.

Parameters
handleEnumeration handle as obtained in one of Browser enumeration calls.
Returns
This function returns a pointer to the next item name in the enumeration. Item type depends on the handle source - one of the browser enumeration calls. This function returns a NULL pointer when NQ Client reaches the end of enumeration.
Note
This is an ASCII version of ccNetworkGetNextItemName()
const NQ_WCHAR* ccNetworkGetNextItemName ( NQ_HANDLE  handle)

Application calls this function after successfully starting a browser enumeration (ccNetworkEnumerateDomains(), ccNetworkEnumerateServers() or ccNetworkEnumerateShares()). Application may withdraw share names one by one by calling ccNetworkGetNextItemName>() with the handle obtained in the current call. When finished with domain enumeration, application must call ccNetworkCloseHandle() to release resources associated with this handle.

Parameters
handleEnumeration handle as obtained in one of Browser enumeration calls.
Returns
This function returns a pointer to the next item name in the enumeration. Item type depends on the handle source - one of the browser enumeration calls. This function returns a NULL pointer when NQ Client reaches the end of enumeration.
CCNetShareItem* ccNetworkGetNextShareItem ( NQ_HANDLE  handle)

Application calls this function after successfully starting a share enumeration (ccNetworkEnumerateShares()).

Application may withdraw CCNetShareItem Items one by one by calling ccNetworkGetNextShareItem() with the handle obtained in the current call. When finished with domain enumeration, application must call ccNetworkCloseHandle() to release resources associated with this handle.

Parameters
handleEnumeration handle as obtained in one of Browser enumeration calls.
Returns
This function returns a pointer to the next item name in the enumeration. Item type depends on the handle source - one of the browser enumeration calls. This function returns a NULL pointer when NQ Client reaches the end of enumeration.
NQ_BOOL ccNetworkGetShareInfoA ( const NQ_CHAR server,
const NQ_CHAR share,
NQ_UINT16 type,
NQ_CHAR remarkBuffer,
NQ_INT  bufferSize 
)

This function is called by application to get information about a particular share on the specified host.

Parameters
serverServer name.
shareShare name.
typeShare types as:
  • directory tree
  • print queue
  • serial device
  • IPC 0x80000000
  • hidden share
remarkBufferBuffer to place the share remark into.
bufferSizeSize of the remark buffer. The recommended value is 256 characters.
Returns
This function returns TRUE if the share information is obtained successfully or FALSE otherwise. Application can examine the error code for the failure reason.
Note
This is an ASCII version of ccNetworkGetShareInfo()
NQ_BOOL ccNetworkGetShareInfo ( const NQ_WCHAR server,
const NQ_WCHAR share,
NQ_UINT16 type,
NQ_WCHAR remarkBuffer,
NQ_INT  bufferSize 
)

This function is called by application to get information about a particular share on the specified host. Parameters

Parameters
serverServer name.
shareShare name.
typeShare types as:
  • directory tree
  • print queue
  • serial device
  • IPC 0x80000000
  • hidden share
remarkBufferBuffer to place the share remark into.
bufferSizeSize of the remark buffer. The recommended value is 256 characters.
Returns
This function returns TRUE if the share information is obtained successfully or FALSE otherwise. Application can examine the error code for the failure reason.
NQ_BOOL ccNetworkCloseHandle ( NQ_HANDLE  handle)

This function is called by application to finish a browser enumeration and release all resources (e.g., - item names) associated with that enumeration.

Parameters
handleAn abstract handle as obtained from one of the browser enumeration calls.
Returns
TRUE on success or FALSE on error.
Note
Currently, this function always return TRUE.
See Also
ccNetworkEnumerateDomains() ccNetworkEnumerateServers() ccNetworkEnumerateShares()
NQ_BOOL ccNetworkResetHandle ( NQ_HANDLE  handle)

This function is called by application to restart a browser enumeration designated by an abstract handle. If this handle was already used in one or more of the ccNetworkGetNextItemName() calls, NQ Client will revert it to the state it has right after the respective Browser enumeration call (see below).

Parameters
handleAn abstract handle as obtained from one of the browser enumeration calls.
Returns
TRUE on success or FALSE on error.
Note
Currently, this function always return TRUE.
See Also
ccNetworkEnumerateDomains() ccNetworkEnumerateServers() ccNetworkEnumerateShares()